<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/sys/include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%@ include file="/WEB-INF/adminui/include/css.jsp" %>
<title>速测数据列表</title>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
	<div class="row">
		<div class="col-sm-2" style="width:18.66666667%">
			<div class="ibox ibox-body">
				<div class="ibox-title">
					<h5>选择企业-园区</h5>
				</div>
				<div class="ibox-content">
					<div id="jstree"></div>
				</div>
			</div>
		</div>
		<div class="col-sm-9">
			<div class="ibox">
				<div class="ibox-body">
					<div class="fixed-table-toolbar">
					</div>
					<table id="dataTable" data-mobile-responsive="true">
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
<%@ include file="/WEB-INF/adminui/include/script.jsp" %>
<script type="text/javascript">
var timeBegin = "种植日期";
var timeEnd = "成熟日期";
var pdttypeV = "${pdttype}";
$(function(){
	UiList.render({
		treeUrl: '${path}/parkjstree/menudatadetection.json?module=products&blockType=${pdttype}',
		tableConfig:{
			url: "${path}/detection/listdata.json?pdttype=${pdttype}",
			idfield: 'pdtid',
			columns: [
				{checkbox : true},
				{field : 'pdtname', title : '名称'},
				{field : 'amount', title : '产量(公斤)'},
				{field : 'workerName', title : '负责人'},
				{field : 'beginTime', title : timeBegin, formatter : function(value, row, index) {
					return formatDate(value, 'yyyy-MM-dd');
				}},
				{field : 'endTime', title : timeEnd, formatter : function(value, row, index) {
					return formatDate(value, 'yyyy-MM-dd');
				}},
				{field : 'pdtcode', title : '产品编码'},
				{field : 'pbn', title : '二维码'},
				{field : 'pdtid', title : '操作', align : 'center', width:270, formatter : function(value, row, index) {
					var s = '';
					<qx:perm code="detection_edit">
					s += '<a class="btn btn-primary btn-sm" href="javascript:;" title="速测数据" onclick="detection(\''+value+'\')">速测数据</a> ';
					</qx:perm>
					return s;
				}}
			]
		}
	});
	
});
function detection(id){
	UiList.open('${path}/detection/detection.do?pdtid='+id, '查看速测数据信息', {full:true});
}
</script>
</body>
</html>